package com.example.dell.fastshopping.user.setting;

import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;

import com.example.dell.fastshopping.network.ApiService;
import com.example.dell.fastshopping.network.NetCallback;
import com.example.dell.fastshopping.network.RetrofitClient;
import com.example.dell.fastshopping.network.http.BaseResponse;

/**
 * Created by ${YSH} on 2019/5/15.
 * 描述        ${TODO}
 * <p>
 * 更新者       $author$
 * 更新时间     $Data$
 * 描述         ${TODO}
 */
public class SettingViewMolder extends ViewModel {
    private ApiService service = RetrofitClient.getInstance().create(ApiService.class);
    private MutableLiveData<BaseResponse> loginout = new MutableLiveData<>();

    public MutableLiveData<BaseResponse> loginOut() {
        RetrofitClient.execute(service.loginOut(), new NetCallback<BaseResponse>() {
            @Override
            public void netCallback(BaseResponse o) {
                loginout.setValue(o);
            }
        });
        return loginout ;

    }
}
